﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Learning.Classifiers
{
    public class Model_Tree
    {
        Tree_Node m_root = null;
        int m_min_lif_num;

        public int getMinLeafNum()
        {
            return m_min_lif_num;
        }

        public Tree_Node Get_Root()
        {
            return m_root;
        }

        public void Set_Root(Tree_Node root)
        {
            if (m_root != null) throw new Exception("cannot change null model root");
            if (root == null) throw new Exception("cannot change null model root");
            m_root = root;
        }

        private int m_split_data_to;


        public int get_Split_data()
        {
            return m_split_data_to;
        }

        private int m_exclude_part;

        public int get_Exclude_Part()
        {
            return m_exclude_part;
        }

        public Model_Tree(Tree_Node root, int split_data_to, int exclude_part, int min_lif_num)
        {
            
            if (min_lif_num < 1) throw new Exception("iligal number of min lif num");
            m_min_lif_num = min_lif_num;
            m_root = root;
            m_split_data_to = split_data_to;
            m_exclude_part = exclude_part;
        }
    }
}
